        <style type="text/css">
            input[type=text]{
            	
            	width:60%;
            	
            }
            </style>
		<div class="form">
			
			<?php $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'project-form',
                    'enableAjaxValidation' => true,
    				'clientOptions'=>array(
    				    'validateOnSubmit'=>true,
    				),
                )); ?>
                
                <div class="row">
					<?php echo $form->labelEx($model, 'pro_title'); ?>
					<?php echo $form->textField($model, 'pro_title', array('size' => 50,'maxlength' => 50, 'title'=>'请输入标题...')); ?>
					<?php echo $form->error($model, 'pro_title'); ?>                
                </div>
				
				<div class="row">
					<?php echo $form->labelEx($model, 'pro_introduce'); ?>
					<!--style给定宽度可以影响编辑器的最终宽度-->
					<script type="text/plain" id="editor" style="width:100%" name="Project[pro_introduce]">
					<?php echo $model->pro_introduce; ?>
					</script>
					<?php echo $form->error($model, 'pro_introduce'); ?>
				</div>
                <div class="one-third  right" >				
    				<div class="row">
    					<?php echo $form->labelEx($model, 'pro_tags'); ?>
    					<?php echo $form->textField($model, 'pro_tags', array('size' => 50,'maxlength' => 50,'title'=>'请输入标签...')); ?>
                            <button type="button" class="download-itunes" id="get_tag" onclick="ykg.getTags('editor','Project_pro_tags');" title="获取标签">获取标签</button> 
    					<?php echo $form->error($model, 'pro_tags'); ?>
    				</div>
    			
                     <div class="row">
            			<hr />
            			<hr />
            			<hr/>
            			<button class="cupid-green"  type="submit"  id="pro_submit" title="<?php echo $model->isNewRecord?'提交':'更新';?>"><?php echo $model->isNewRecord?'提交':'更新';?></button>
            			<hr />
            			<hr />
            			<?php echo $form->errorSummary($model); ?> 
            		</div>
                </div>
                <div style="float:right;">
            		<div class="row">
            			<?php echo $form->labelEx($model,'pro_cid'); ?>
            		</div>
            		
            		<div class="row"  style="overflow-y:auto; padding:5px; min-width:250px;max-height:200px;">
            			<div class="widget" >
            	              <?php 
            					echo UtilTree::generateCheckTreeByType(Category::CATEGORY_LAB, 'checkItem', array('class'=>'categories','id'=>'categoryList'));
            			    	//$this->widget('application.components.school.category.ProjectCategoryList');
            			   	?> 				
            			</div>			
            			<input type="hidden" id="Project_pro_cids" name="Project[pro_cids]"/>
            			<textarea rows="3" style="display:none;" cols="20" id="Project_pro_result" name="Project[pro_result]"></textarea>
              
                	</div>	
                	
                	<div class="row">
                    	&nbsp;&nbsp;<span id="categorylabel"><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="ykg.showNext($(this));" >增加分类</a>
                        
            	       	<div class="hide">	<br />
            	               <div style="margin:0px;">
            	                   <?php echo $form->dropDownList($model,'pro_cid', Category::model()->getCategoryDropdownList(Category::CATEGORY_LAB),array(
            	                   			'title'=>'选择分类'
            	                   		)); ?>
            	
            	                   <?php echo $form->error($model,'pro_cid'); ?>
            	               </div>
            		           <div  style="padding-top:10px;">
            	                  	
            	        		  <input type="text" id="categoryName" name="categoryName" title="输入新分类"/>	
            	               </div>
            	                <br />
            	                <button class="minimal" id="add_category" type="button" onclick="ykg.addCategory('Project_pro_cid','<?php echo Category::CATEGORY_LAB; ?>')"  title="添加分类">添加分类</button>    		
            	    	</div>	 
                	</div>
            		
            
            	</div>
                <div >
                
                </div>
			
			<?php $this->endWidget(); ?>
			
		</div><!-- form -->			


<?php

$this->widget('ext.editor.ueditor.ueditorWidget', array(
    'id' => 'editor',
    //			'initialContent' => '<span style="color:#ccc">欢迎使用ueditor</span>',
    //			'initialStyle' => 'body{margin:8px;font-family:"宋体";font-size:16px;}',
    'elementPathEnabled' => true,
    'autoFloatEnabled' => true,
    //'topOffset'=>30,
    //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度，则设置无效)
    //'toolbarTopOffset'=>400,
    'minFrameHeight' => 320,
    'initialFrameHeight' => 320,
    // 			'minFrameWidth'=>800,
    'minFrameWidth' => '100%',
    //			'autoClearinitialContent' => true,
    'imagePath' => '/',
    'textarea' => 'content',

    'autoHeightEnabled' => true,
    // 			'toolbars'=>array(array('Undo','Redo','|','ForeColor','BackColor', 'Bold','Italic','Underline','JustifyLeft','JustifyCenter','JustifyRight','InsertImage','ImageNone','ImageLeft','ImageRight','ImageCenter' )),
    ));

$this->widget('ext.poshytip.Poshytip');

?>
